package com.cn.server;

import com.cn.entity.User;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2017/8/29.
 */
@Service("testServer")
public class TestServer implements ITestServer{
    @Override
    public String getStr(String s) {
        return "返回值："+s;
    }

    @Override
    public List<String> getList(String str) {
        List<String> list=new ArrayList<>();
        for(int i=0;i<10;i++){
            list.add(str+"-"+i);
        }
        /*try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }*/
        return list;
    }

    @Override
    public List<User> getUser(String name){
        List<User> list = new ArrayList<>();
        for(int i=0;i<10;i++){
            list.add(new User((long) i,name+"-"+i));
        }
        return list;
    }
}
